package ddb.tasktracker.intf.context.http;

public class HttpUploadResult {

	private int successCount;
	private int failedCount;
	private String[] successFiles;
	private HttpUploadFailedFile[] failedFiles;

	public HttpUploadResult() {

	}

	public HttpUploadResult(String[] successFiles, HttpUploadFailedFile[] failedFiles) {
		this.successFiles = successFiles;
		this.failedFiles = failedFiles;
		if (successFiles != null)
			this.successCount = successFiles.length;
		if (failedFiles != null)
			this.failedCount = failedFiles.length;
	}

	public int getSuccessCount() {
		return successCount;
	}

	public void setSuccessCount(int successCount) {
		this.successCount = successCount;
	}

	public int getFailedCount() {
		return failedCount;
	}

	public void setFailedCount(int failedCount) {
		this.failedCount = failedCount;
	}

	public String[] getSuccessFiles() {
		return successFiles;
	}

	public void setSuccessFiles(String[] successFiles) {
		this.successFiles = successFiles;
	}

	public HttpUploadFailedFile[] getFailedFiles() {
		return failedFiles;
	}

	public void setFailedFiles(HttpUploadFailedFile[] failedFiles) {
		this.failedFiles = failedFiles;
	}

	public static HttpUploadResult empty() {
		HttpUploadResult result = new HttpUploadResult();
		result.successFiles = new String[0];
		result.failedFiles = new HttpUploadFailedFile[0];
		return result;
	}
}
